package com.zhy.springcloud.service;

import com.zhy.springcloud.enetities.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")//服务提供者的配置名称
public interface PaymentFeignService {

    //服务提供者 8001/8002 的控制层内容
    @GetMapping(value = "/payment/get/{id}")
    CommonResult<com.zhy.springcloud.entities.Payment> getPaymentById(@PathVariable("id") Long id);

    @GetMapping("/paymet/feign/timeout")
    String paymentFeignTimeOut();
}
